# /Users/caozitong/Desktop/7-17.txt


def print_file_info(file_name):
    file = None
    try:
        file = open(file_name, "r", encoding="utf-8")
        result = file.read()
        print(result)
    except FileNotFoundError as f:
        print(f)
    finally:
        if file:
            file.close()


def append_to_file(file_name, data):
    a_file = open(file_name, "a", encoding="utf-8")
    a_file.write(data)
    a_file.write("\n")
    a_file.close()


if __name__ == '__main__':
    print_file_info("/Users/caozitong/Desktop/7-17.txt")

